<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>顺风车  --- 我做主：销售记录管理</title>
<link href="${ctx}/css/myhome-css/home_service_base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/myhome-css/selled-log.css" rel="stylesheet" type="text/css" />
</head>
<body>

    <!--右栏开始-->
    <div id="orderList" class="account_right">
      <h2>管理我的销售记录</h2>
      <h3>可以用来查看、删除等操作管理我的销售记录</h3>
      <div class="logList">
      	<ul class="logListTitle">
        	<li class="li1">商品名</li>
            <li class="li2">买家</li>
            <li class="li3">价格</li>
            <li class="li4">卖出时间</li>
            <li class="li5">操作</li>
        </ul>
        <div class="logs">
        <!--
        	<ul>
            	<span class="openImg"><a id="i" href="#"><img src="${ctx}/images/myhome-img/tree.gif" /></a></span>
            	<li>新山地变速车</li>
            	<li>康</li>
            	<li>￥180.00</li>
            	<li>2011/04/01</li>
            	<li>
                    <a href="#">删除</a>&nbsp;
                </li>
            </ul>
            <p><span>购买数量：1辆 </span><span>总金额：180.00元 </span><span class="comment">liang的评价：好，发货非常的快！真的是一辆好车！</span></p>
        -->
        <s:if test="page.pageList !=null">
          <s:iterator value="page.pageList" status="itStatus">
            <ul>
            	<li class="openImg"><a href="#"><img src="${ctx}/images/myhome-img/tree.gif"/></a></li>
            	<li class="li1">&nbsp;<c:out value="${bookName[itStatus.index]}" escapeXml="false"/></li>
            	<li class="li2">&nbsp;<c:out value="${buyerName[itStatus.index]}" escapeXml="false"/></li>
            	<li class="li3">&nbsp;<s:property value="price" escape="false"/></li>
            	<li class="li4">&nbsp;<s:date name="createTime" format="yyyy'/'M'/'d" /></li>
            	<li class="li5">
                    <a href="${ctx}/home/selled-log!delete.action?id=${id}">删除</a>
                </li>
            </ul>
            <p style="clear:both;"><span>购买数量：<s:property value="count" escape="false"/></span><span>总金额：<s:property value="price*count" escape="false"/>元 </span>
               <span class="comment"><c:out value="${buyerName[itStatus.index]}" escapeXml="false"/>
              	 的评价：<c:out value="${fn:substring(content,0,10)}" escapeXml="true"/>
							<c:if test="${fn:length(content)>10}">...</c:if>
               </span>
            </p>
            <div style="clear:both;"></div>
          </s:iterator>
          </s:if>
          <s:else>
          <ul><li style="width:400px;">Sorry,你还没有销售记录！</li></ul>
          </s:else>
        </div>
        <div class="nextPage">
          <n:page actionUrl="${ctx}/home/selled-log.action" sumPages="${page.totalPages}" activePage="${page.currentPage}" pageNoKey="niagara_params_pageNo"/>
      	</div>
      </div>
      
    </div>
    <div class="empty_box"></div>
    <div style="POSITION: absolute" id="tag_box"></div>
<script>
	var j = $(".openImg>a").length;
	var flag = new Array;
	for(var i=0;i<j;i++){
		flag[i] = true;
	}
	$(".openImg>a").click(function(){
		var these = $(".openImg>a");
		if(flag[these.index(this)]){
			flag[these.index(this)] = false;
			$($(".logs>p")[these.index(this)]).slideDown("fast");
		}else{
			flag[these.index(this)] = true;
			$($(".logs>p")[these.index(this)]).slideUp("fast");
		}
	});
</script>
    <!--右栏结束-->

</body>
</html>